package org.benetech.beans;

/**
 * Text that is relative to something else. It has a direction (forward or back) and a distance. The meaning of the
 * distance is arbitrary, and depends on the context that this bean is used in.
 * @author Reuben Firmin
 */
public class RelativeText {

	private boolean forward;
	private int distance;
	private String text;


	/**
	 * Constructor.
	 * @param forward Is the text forward?
	 * @param distance The distance
	 * @param text The text, never null
	 */
	public RelativeText(final boolean forward, final int distance, final String text) {
	    super();
	    this.forward = forward;
	    this.distance = distance;
	    this.text = text;
    }

	/**
	 * Get the distance.
	 * @return distance
	 */
	public final int getDistance() {
    	return distance;
    }

	/**
	 * Get direction.
	 * @return true for forward
	 */
	public final boolean isForward() {
    	return forward;
    }

	/**
	 * The text.
	 * @return Never null
	 */
	public final String getText() {
    	return text;
    }
}
